package ajax.quanxuan.sys.service;

import ajax.quanxuan.sys.entity.Role;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author KazuGin
 * @since 2024-07-09
 */
public interface RoleService extends IService<Role> {
    /**
     * 保存分配权限关系
     * @param rid
     * @param ids
     * @return
     * @throws Exception
     */
    boolean saveRolePermission(int rid, String ids) throws Exception;

    /**
     * 根据角色id查询角色拥有的权限菜单id
     * @param roleId
     * @return
     */
    Set<Integer> findRoleParmissionByRoleId(Integer roleId);
    List<Role> list(Role role);
    Integer count(Role role);

    List<Map<String,Object>> listAll(Role role);
}
